# 函数
# def calSum(beg,end):
#     sum = 0
#     for i in range(beg,end+1):
#         sum += i
#     print(sum)
#
#
# calSum(1, 100)
# calSum(200, 300)
# calSum(1, 1000)
#
# def test():
#     print("hello mihayou")
#
#
# test()
# test()

def test(a):
    print(a)


test(10)
test('hello')
test(True)
test(10.2)

def add(a, b, c):
    return a + b + c


print(add(10, 20, 30))
print(add(10.1, 10.2, 10.3))
print(add('hello', 'world', 'haha'))

def isOdd(num):
    if num % 2 == 0:
        return False
    else:
        return True


print(isOdd(10))
print(isOdd(11))

# py函数可以返回多个值
def getPoint():
    x = 10
    y = 20
    return x, y


# a, b = getPoint()
# print(a, b)

# 下划线可以占位
_, b = getPoint()
print(b)
